Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds a check for errors on useAsyncStoryblok to prevent errors from gettting to clients. #259

Conversation

SebbeJohansson
Copy link
Contributor

@SebbeJohansson SebbeJohansson commented Dec 20, 2022

This change adds a check agains the error object coming from useAsyncData to prevent axios errors getting down to the client.
This is how it looks without the check:
image
With the check:
image

This changes has been tested against my content project.

Note:
I am not sure on the method to check if a proper result is enough or if you have a more preferred way of doing it.

@Dawntraoz
Copy link
Contributor

I'm closing this PR, so we can merge the solution implemented with createError being thrown instead #295

@Dawntraoz Dawntraoz closed this Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix [PR] Fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants